#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
	/*int a = 0;
	do
	{
		a++;
		printf("%d ", a);
	} while (a <= 10);*/

	/*int a = 0;
	do
	{
		scanf("%d", &a);
		a++;
		if (a >= 5)
		{
			break;
		}
		printf("a = %d\n", a);
	}
		while (a <= 10);*/
	
	int n = 0;
	int a = 0;
	int b = 1;
	scanf("%d", &n);
	for (a = 1; a <= n; a++)
	{
		b = b * a;
	}
	printf("%d", b);

	/*int a = 0;
	for (a = 1; a = 5; a++)
	{
		printf("%d ", a);
	}*/
	
	//int n = 0;
	//int a = 0;
	//int b = 1;
	//for (a = 1; a <= 10; a++)
	//{
	//	b = b * a;
	//	n = b + n;
	//}
	//printf("%d", n);
	return 0;
}